home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / AmokEd / macros / OberonLink.aed < prev    next >
Encoding:
Text File  |  1996-09-27  |  714 b   |  40 lines

  1. /* OberonLink  - Linkt Oberon-Programme */
  2.  
  3. parse arg filename opts .
  4.  
  5. options results
  6. 'getval $screenname'
  7. screenname = result
  8.  
  9. call close 'STDERR'
  10. call open 'STDERR','NIL:','W'
  11. call close 'STDIN'
  12. call close 'STDOUT'
  13. call open 'STDOUT','CON:0/0/640/256/RexxCon/SCREEN'||screenname,'RW'
  14. call pragma '*','STDOUT'
  15.  
  16. l = lastpos('.mod',filename)
  17. if l ~= (length(filename)-3) then do
  18.   'title (No Oberon source!)'
  19.   exit 20
  20. end
  21. linkname = left(filename,l)
  22.  
  23. open('file','env:OProject','R')
  24. project = readln('file')
  25. close('file')
  26.  
  27. IF open('file','env:'||project||'.OLopt','R') THEN DO
  28.   opts = readln('file')
  29.   close('file')
  30. END;
  31.  
  32. address command 'OLink' opts linkname
  33.  
  34. if rc ~=0 then
  35.   delay(100)
  36.  
  37. close('STDOUT')
  38. exit
  39.  
  40.